import java.io.Serializable;

public class ComptePerso extends Compte implements Serializable{
	
	private static final long serialVersionUID = 1L;
	/**
	 * 
	 */
	
	private ClientPhysique client;

	public ComptePerso(int n, String t, float s, int d, ClientPhysique c) {
		super(n,t,s,d);
		this.lierClientPhysique(c);
	}
	
	public void setClientPhysique(ClientPhysique c)
	{client = c;}
	
	private void lierClientPhysique(ClientPhysique c) {
		this.setClientPhysique(c);
		c.rajoutCompte(this);
	}
	
	public ClientPhysique getClientPhysique() {
		return(client);
	}
	
	public String toString(){
		return "Compte "+this.getType()+" N°" + this.getNumero();
	}

}
